PWriteLAP
MPPPBPtr thePBptr; pointer to an LAPparms structure Boolean async; 0=await completion; 1=immediate return thePBptr iis a pointer to an LAPparms structure. Æ csCode short 2 26 always writeLAP
Æ wdsPointer Ptr 4 30 write data structure async is a Boolean value. Use FALSE for normal ( synchronous) operation or TRUE to enqueue the request and resume control immediately. See Async I/O.
noErr (0) No error
ddpLengthErr (-92) Packet length exceeds maximum
lapProtErr (-94) Invalid ALAP protocol type
excessCollsns (-95) No CTS received after 32 RTS's
Notes: The frame data and destination of the frame are described by the write data
structure pointed to by wdsPointer. The first two data bytes of an ALAP
indicate the length of the frame in bytes. The ALAP protocol type must be in
the range 1 to 127.
Most programs will never need to call ALAP, because higher- level
protocols will automatically call ALAP as necessary. If you do want to send a
frame directly via ALAP, call the PWriteLAP function. There is no PReadLAP function. If you want to read ALAP frames, you must call
PAttachPH to add your protocol handler to the node's protocol handler table. The ALAP module will examine every incoming frame and call your
protocol handler for each frame received with the correct ALAP protocol.
When your program no longer wants to receive frames with a particular
ALAP protocol type value, it can call PDetachPH to remove the corresponding protocol handler from the protocol handler table.